package blackitheima1.ClassTest;

import blackitheima1.Domain.Student;

//反射获取class对象
public class MyClass1 {
    public static void main(String[] args) throws ClassNotFoundException {
        System.out.println("获得class对象");
        Class<?> aClass = Class.forName("blackitheima1.Domain.Student");
        System.out.println(aClass);

        Class<Student> studentClass = Student.class;
        System.out.println(studentClass);

        Student s=new Student();
        Class<? extends Student> aClass1 = s.getClass();
        System.out.println(aClass1);


    }
}
